<template>
  <div style="min-width: 300px;width: 100%;">
    <h3>{{language.Locker}}</h3>
    <div v-for="(item,index) in device.array" :key="'lock_'+index" class="divControlButton">
      <a href="javascript:void(0);" class="button button-rounded button-flat-primary" v-on:click="handleOpen(item,)">
        <i style="color:#ffffff" class="fa fa-power-off"></i>{{language.Unlock}}</a>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'AuthLock',
    props: {
      device: {
        default () {
          return {
            type: null,
            value: {},
            array: []
          }
        }
      }
    },
    data() {
      return {
        language: language
      }
    },
    computed: {

    },
    watch: {
      device(nv, ov) {
        if (!nv) {
          return
        }
      }
    },
    created() {},
    methods: {
      handleOpen(device) {
        controlDevice(device.devId, "OPENDOOR")
      }
    }
  }

</script>
